export function getRects2(images, sets) {
  let a = getRandom(images, sets)
  return a
  // for(let i=0;i<5;i++){
  //   for(let j=0;j<5;j++){
  //     let p = {x: i, y: j}
  //   }
  // }
}

function getRandom(sources, sets) {
  let length = sources.length
  if (sources.length === sets.length) return -1
  while (true) {
    let index = Math.floor(Math.random() * length)
    if (sets.indexOf(sources[index]) < 0) {
      sets.push(sources[index])
      return sources[index]
    }
  }
}